package com.example.cloud.model.personal;

import com.alibaba.fastjson.annotation.JSONField;
import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;

/**
 * Created by ygl on 2017/4/9.
 * 主班排班
 */
@Entity(name = "main_class")
@Data
@EqualsAndHashCode(callSuper = false)
public class MainClass extends CommonModel{
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Column(name = "user_id")
    private Long userId;

    @Column(name = "user_name")
    private String userName;

    @JSONField(format = "yyyy-MM-dd")
    @Column(name = "duty_date")
    private Date dutyDate;

    @Column(name="account_id")
    private Long accountId;

    @Transient
    private String dutyDateStr;

    @Transient
    private Integer day;

    @Transient
    private Integer isDay = 0;
}
